4. Docker hardware interaction and data processing

 

The operating environment and software and hardware reference configuration are as follows:

4.1. Hardware mounting (port binding)

  1. Establish udev rules (/etc/udev/rules.d/) in the host machine, see chapter [6. Linux operating system ---- 6. Bind device ID]

  2. Then when opening the container, mount the devices with the rules set into the docker container through --device=/dev/myserial --device=/dev/rplidar and other parameters.

  1. The device can be found in the docker container

 

4.2. Display of GUI in docker

  1. Install on the host machine:

  1. Execute in the host machine: xhost +

After the following picture is displayed normally, perform 3 steps:

1

  1. Execute the command on the host to enter the container:

  1. Test

 

 

4.3. Transfer files between docker container and host machine

4.3.1. Use cp naming

4.3.1.1. Copy files from the container to the host

 

4.3.1.2. Copy files from the host to the container